package cn.tedu.oop;

public class Test3_Block {
    public static void main(String[] args) {
        new Person().show();
        new Person("熊大");
    }
}
class Person{
    int age;
    {
        age = 0;
        System.out.println("构造代码块");
    }
    public Person(){
        System.out.println("无参构造方法"+age);
    }
    public Person(String name){
        System.out.println("含参构造方法"+name+age);
    }
    public void show(){
        {
            int x = 10;
            System.out.println(x);
            System.out.println("局部代码块");
        }
    }
}